const express = require('express');
const router = express.Router();
const expressJoi = require('@escook/express-joi')
const {columnListCheck, updateColumnListCheck, deleteColumnListCheck, addColumnListCheck} = require('../utils/check')
const columnList = require('../controllers/columnList')

// 栏目列表管理接口
router.get('/columnList', expressJoi(columnListCheck), columnList.columnList)

// 栏目列表添加接口
router.post('/addColumnList', expressJoi(addColumnListCheck), columnList.addColumnList)

// 栏目修改接口
router.get('/updateColumnList', expressJoi(updateColumnListCheck), columnList.updateColumnListById)

// 栏目删除接口
router.get('/deleteColumnList', expressJoi(deleteColumnListCheck), columnList.deleteColumnListById)

module.exports = router;